﻿CREATE TABLE [dbo].[Table]
(
	TableID int  IDENTITY (1, 1) NOT NULL, 
	DatabaseID int NOT NULL,
	TableName varchar(126) NOT NULL,
	[Rows] int Null,
	TotalSize decimal NUll,
	DataSize decimal NUll,
	IndexSize decimal  NULL,
	Unused decimal  NUll
	
	CONSTRAINT [PK_DatabaseTable] PRIMARY KEY CLUSTERED 
(
	[TableId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[Table]  WITH CHECK ADD  CONSTRAINT [FK_Tables_Database] FOREIGN KEY([DatabaseID])
REFERENCES [dbo].[Database] ([DatabaseID])
GO

ALTER TABLE [dbo].[Table] CHECK CONSTRAINT [FK_Tables_Database]
GO

